import './assets/main.css'
import './assets/css/style.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
//引入pinia插件
import persistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'
import 'element-plus/dist/index.css'
// 导入 Element-Plus插件
import ElementPlus from 'element-plus'
//element-plus 全局 国际化插件
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//element-plus 图标插件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)

// 创建 Pinia 实例并挂载到应用
const pinia = createPinia();
pinia.use(persistedstate)
app.use(pinia)

app.use(router)
//配置 elementplus的插件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, {
    locale: zhCn,
})

app.mount('#app')
